package cn.lxh.ymcc.controller;

import cn.lxh.ymcc.doc.CourseDoc;
import cn.lxh.ymcc.result.JSONResult;
import cn.lxh.ymcc.service.ICourseEsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 删除 doc --es
 */
@RestController
public class DeleteEsController {
    @Autowired
    private ICourseEsService courseEsService;

    /**
     * 保存课程到Es
     * @param doc
     * @return
     */
    @PostMapping("/deleteCourse")
    public JSONResult deleteCourse(@RequestBody CourseDoc doc){
        courseEsService.deleteCourse(doc);
        return JSONResult.success();
    }
    
}
